package Lesson;

import java.util.Scanner;

public class Demo2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        System.out.println("请随意输入：");
        String str = sc.nextLine();

        int bigCount = 0;
        int smallCount = 0;
        int numCount = 0;
        char[] chr = str.toCharArray();

        for (int i = 0; i < chr.length; i++) {
            if(chr[i] >= 'A' && chr[i] <= 'Z'){
                bigCount++;
            } else if (chr[i] >= 'a' && chr[i] <= 'z') {
                smallCount++;
            }else {
                numCount++;
            }
        }

        System.out.println("大写："+bigCount);
        System.out.println("小写："+smallCount);
        System.out.println("数字："+numCount);
    }
}
